<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Button组件 | Vue Design</title>
    <meta name="generator" content="VuePress 1.5.2">
    
    <meta name="description" content="Vue Design组件库，vue-design组件库">
    <link rel="preload" href="/vue-design/assets/css/0.styles.20e2b7e0.css" as="style"><link rel="preload" href="/vue-design/assets/js/app.5657b3bb.js" as="script"><link rel="preload" href="/vue-design/assets/js/2.189b265f.js" as="script"><link rel="preload" href="/vue-design/assets/js/9.16498d33.js" as="script"><link rel="preload" href="/vue-design/assets/js/5.ff53742f.js" as="script"><link rel="prefetch" href="/vue-design/assets/js/10.25c0c63e.js"><link rel="prefetch" href="/vue-design/assets/js/11.6e537c36.js"><link rel="prefetch" href="/vue-design/assets/js/3.44e36dad.js"><link rel="prefetch" href="/vue-design/assets/js/4.6ad2a252.js"><link rel="prefetch" href="/vue-design/assets/js/6.2a906655.js"><link rel="prefetch" href="/vue-design/assets/js/7.4c2278f8.js"><link rel="prefetch" href="/vue-design/assets/js/8.c8290b09.js">
    <link rel="stylesheet" href="/vue-design/assets/css/0.styles.20e2b7e0.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/vue-design/" class="home-link router-link-active"><!----> <span class="site-name">Vue Design</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/vue-design/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/vue-design/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/vue-design/component/button.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  组件
</a></div><div class="nav-item"><a href="https://google.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  External
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/vue-design/" class="nav-link">
  首页
</a></div><div class="nav-item"><a href="/vue-design/guide/" class="nav-link">
  指南
</a></div><div class="nav-item"><a href="/vue-design/component/button.html" aria-current="page" class="nav-link router-link-exact-active router-link-active">
  组件
</a></div><div class="nav-item"><a href="https://google.com" target="_blank" rel="noopener noreferrer" class="nav-link external">
  External
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <!----></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>基础组件</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/vue-design/component/button.html" aria-current="page" class="active sidebar-link">Button组件</a><ul class="sidebar-sub-headers"><li class="sidebar-sub-header"><a href="/vue-design/component/button.html#基础用法" class="sidebar-link">基础用法</a></li><li class="sidebar-sub-header"><a href="/vue-design/component/button.html#禁用状态" class="sidebar-link">禁用状态</a></li><li class="sidebar-sub-header"><a href="/vue-design/component/button.html#api" class="sidebar-link">API</a></li></ul></li><li><a href="/vue-design/component/input.html" class="sidebar-link">input组件</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h2 id="基础用法"><a href="#基础用法" class="header-anchor">#</a> 基础用法</h2> <Button>默认按钮</Button> <Button type="primary">主要按钮</Button> <Button type="success">成功按钮</Button> <Button type="info">信息按钮</Button> <Button type="warning">警告按钮</Button> <Button type="danger">危险按钮</Button> <h2></h2> <Button type="primary" block="">块级按钮</Button> <div class="language- extra-class"><pre class="language-text"><code>&lt;Button&gt;默认按钮&lt;/Button&gt;
&lt;Button type=&quot;primary&quot;&gt;主要按钮&lt;/Button&gt;
&lt;Button type=&quot;success&quot;&gt;成功按钮&lt;/Button&gt;
&lt;Button type=&quot;info&quot;&gt;信息按钮&lt;/Button&gt;
&lt;Button type=&quot;warning&quot;&gt;警告按钮&lt;/Button&gt;
&lt;Button type=&quot;danger&quot;&gt;危险按钮&lt;/Button&gt;
</code></pre></div><h2 id="禁用状态"><a href="#禁用状态" class="header-anchor">#</a> 禁用状态</h2> <Button disabled="disabled">默认按钮</Button> <Button disabled="disabled" type="primary">主要按钮</Button> <Button disabled="disabled" type="success">成功按钮</Button> <Button disabled="disabled" type="info">信息按钮</Button> <Button disabled="disabled" type="warning">警告按钮</Button> <Button disabled="disabled" type="danger">危险按钮</Button> <div class="language- extra-class"><pre class="language-text"><code>&lt;Button disabled&gt;默认按钮&lt;/Button&gt;
&lt;Button disabled type=&quot;primary&quot;&gt;主要按钮&lt;/Button&gt;
&lt;Button disabled type=&quot;success&quot;&gt;成功按钮&lt;/Button&gt;
&lt;Button disabled type=&quot;info&quot;&gt;信息按钮&lt;/Button&gt;
&lt;Button disabled type=&quot;warning&quot;&gt;警告按钮&lt;/Button&gt;
&lt;Button disabled type=&quot;danger&quot;&gt;危险按钮&lt;/Button&gt;
</code></pre></div><h2 id="api"><a href="#api" class="header-anchor">#</a> API</h2> <table><thead><tr><th>属性</th> <th>说明</th> <th>类型</th> <th>默认值</th></tr></thead> <tbody><tr><td>type</td> <td>按钮类型，可选值default、primary、success、info、warning、danger</td> <td>String</td> <td>default</td></tr> <tr><td>block</td> <td>是否长按钮，开启后，按钮长度为100%</td> <td>Boolean</td> <td>false</td></tr> <tr><td>icon</td> <td>设置按钮的图标类型</td> <td>String</td> <td>-</td></tr> <tr><td>size</td> <td>large / small / mini、default</td> <td>String</td> <td>default</td></tr> <tr><td>disabled</td> <td>是否禁用状态</td> <td>Boolean</td> <td>false</td></tr> <tr><td>round</td> <td>是否圆角按钮</td> <td>Boolean</td> <td>false</td></tr> <tr><td>circle</td> <td>是否圆形按钮</td> <td>Boolean</td> <td>false</td></tr> <tr><td>loading</td> <td>是否加载中状态</td> <td>Boolean</td> <td>false</td></tr></tbody></table> <div data-v-fcc06ef2><div id="gitalk-container" data-v-fcc06ef2></div></div></div> <footer class="page-edit"><!----> <!----></footer> <div class="page-nav"><p class="inner"><!----> <span class="next"><a href="/vue-design/component/input.html">
        input组件
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/vue-design/assets/js/app.5657b3bb.js" defer></script><script src="/vue-design/assets/js/2.189b265f.js" defer></script><script src="/vue-design/assets/js/9.16498d33.js" defer></script><script src="/vue-design/assets/js/5.ff53742f.js" defer></script>
  </body>
</html>
